package com.hzhc.controller.yworder;


import com.hzhc.annotation.SysTemLog;
import com.hzhc.common.BaseController;
import com.hzhc.dto.UserDto;
import com.hzhc.entity.CntrInfo;
import com.hzhc.enumBean.LoginUserType;
import com.hzhc.service.CancelSendTransportService;
import com.hzhc.utils.ResultUtil;
import com.hzhc.utils.TokenUtil;
import lombok.RequiredArgsConstructor;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 取消发运 前端控制器
 * </p>
 *
 * @author shizj
 * @since 2024-09-02
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/cancelSendTransport")
public class CancelSendTransportController extends BaseController {
    private final CancelSendTransportService cancelSendTransportService;

    /**
     * 在场箱查询取消发运新增
     */
    @PostMapping("/addCancelSendTransport")
    @SysTemLog(operModul = "调度管理-在场箱查询",operType = "ADD",operDesc = "取消发运添加",modular="PC")
    public ResultUtil<T> addCancelSendTransport(HttpServletRequest request, @RequestBody CntrInfo info){
        UserDto user = TokenUtil.getUserMember(request);
        return cancelSendTransportService.addCancelSendTransport(user,info, LoginUserType.MEMBER.getCode());
    }
}
